# import cv2
#
# img = cv2.imread('1.jpg')
#
# resize_img = cv2.resize(img,(300,300))
#
# cv2.imshow('resize_img', resize_img)


import cv2
import numpy as np

# 创建一个简单的示例图像
img = np.array([[1, 2, 3],
                [4, 5, 6],
                [7, 8, 9]], dtype=np.uint8)

# 使用 BORDER_REFLECT 填充
reflected_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
print("BORDER_REFLECT 结果:", reflected_img)


cv2.waitKey(0)